feat(ext): add Mistral AI model support to OpenAIChatCompletionClient - #8064
feat(ext): add Mistral AI model support to OpenAIChatCompletionClient#8064Siddhesh Kabra (Xsidz) wants to merge 3 commits into
Conversation
Fixes microsoft#6151 Adds 11 Mistral AI models (mistral-large, mistral-small, codestral, ministral-8b/3b, pixtral-large/12b, open-mistral-7b, open-mixtral-8x7b/8x22b, open-codestral-mamba) with their capability flags and context window sizes. Auto-sets base_url to api.mistral.ai/v1/ and reads MISTRAL_API_KEY from the environment when a Mistral model name is used, mirroring the Gemini pattern.
|
Siddhesh Kabra (@Xsidz) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
|
Siddhesh Kabra (@Xsidz) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
microsoft-github-policy-service agree |
|
@microsoft-github-policy-service agree |
Summary
Fixes #6151
Adds Mistral AI model support to
OpenAIChatCompletionClient, mirroring the existing Gemini/Claude/Llama pattern.Changes in
_model_info.py:mistral-large-latest,mistral-small-latest,codestral-latest,ministral-8b-latest,ministral-3b-latest,pixtral-large-latest,pixtral-12b-latest)mistral-large-2411,mistral-small-2503,codestral-2501,ministral-8b-2410,ministral-3b-2410,pixtral-large-2411,pixtral-12b-2409,open-mistral-7b,open-mixtral-8x7b,open-mixtral-8x22b,open-codestral-mamba)MISTRAL_API_BASE_URL = "https://api.mistral.ai/v1/"Changes in
_openai_client.py:base_urltoMISTRAL_API_BASE_URLwhen model name starts with a Mistral prefix (mistral-,codestral-,ministral-,pixtral-,open-mistral-,open-codestral-,open-mixtral-)MISTRAL_API_KEYfrom environment when noapi_keyis providedUsage after this change:
Test plan
test_mistral_model_info: verifies model pointer resolution, capability flags, andMISTRAL_API_BASE_URLconstanttest_parse_r1_content(existing) still passespackages/autogen-ext/tests/models/suite: 64 passed, 11 skipped, 0 new failures (pre-existing failure intest_anthropic_model_client[bedrock]due to deprecated AWS Bedrock model, unrelated to this change)